<?php
namespace Common\Controller;
use Common\Controller\BaseController;
/**
 * Home基类控制器
 */
class HomeBaseController extends BaseController{
	/**
	 * 初始化方法
	 */
	public function _initialize(){
		parent::_initialize();
		/*模型定义*/
    $this->ArticleModel = D('Article');//文章模型
		$this->CategoryModel = D('Category'); //栏目模型
		$this->PagesModel = D('Pages');//单页模型
		$this->LinksModel = D('Links');//友链模型
		$this->AdsModel = D('Ads');
		$this->MessageModel = D('Message');//留言模型
    /*顶级栏目*/
    $catid = I('catid',0,'intval');
    $this->topinfo = get_topinfo($catid);
    $this->assign('topinfo',$this->topinfo);
    /*页面导航*/
    $NAVS = get_Navigation($this->topinfo['id']);
    $this->assign('NAVS',$NAVS);
    /*系统配置*/
    $this->Config = D('Config')->find(1);
    $this->assign('System_Config',$this->Config);
    $this->assign("KFTool",KFTool());
	}
}
